#include "junix.h"
using namespace std;

int main(int argc, char **argv)
{
	srand(time(0));
	vector<int> v(20);
	generate(v.begin(), v.end(),
			boost::bind( modulus<int>(), boost::bind(rand), 20));
	sort(v.begin(),v.end());
	ostream_iterator<int> oit(cout, " ");

	copy(v.begin(), v.end(), oit);

	copy( lower_bound(v.begin(),v.end(), 5, greater_equal<int>()),
			v.end(), oit);
	cout<<endl;

	copy( upper_bound(v.begin(), v.end(), 5,greater<int>()),
			v.end(), oit);
	cout<<endl;
}
